#pragma once
#include <vector>

using namespace std;

namespace reverseInt
{
	class Solution {
	public:
		int reverseInt(int x) {
			long res = 0;
			while (x != 0) {
				res = res * 10 + x % 10;
				x /= 10;
			}
			return (int)res == res ? (int)res : 0;
		}
	};
}